The patch attached removes pda.h and asm_offset.c by deleting unused or
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 15 Aug 2005 07:51:58 +0000 (07:51 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 15 Aug 2005 07:51:58 +0000 (07:51 +0000)
unnecessary variables (that were used for old codes).

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
linux-2.6-xen-sparse/arch/xen/x86_64/Makefile
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/asm-offsets.c [deleted file]
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pda.h [deleted file]

index 9f506b3203bff0fa506e8716be34f495a52845b1..3c25ae9a1cc22a2f1d44e6a1a0f8333d55b95922 100644 (file)
@@ -79,14 +79,15 @@ xenflags-y += -Iinclude/asm-xen/asm-x86_64/mach-xen
 CFLAGS += $(xenflags-y)
 AFLAGS += $(xenflags-y)
 
-prepare: include/asm-$(XENARCH)/asm_offset.h
-CLEAN_FILES += include/asm-$(XENARCH)/asm_offset.h
+prepare: include/asm-$(XENARCH)/asm_offsets.h
+CLEAN_FILES += include/asm-$(XENARCH)/asm_offsets.h
 
 arch/$(XENARCH)/kernel/asm-offsets.s: include/asm include/.asm-ignore \
        include/linux/version.h include/config/MARKER
 
-
-include/asm-$(XENARCH)/asm_offset.h: arch/xen/x86_64/kernel/asm-offsets.s
+include/asm-$(XENARCH)/offset.h: arch/$(XENARCH)/kernel/asm-offsets.s
        $(call filechk,gen-asm-offsets)
-       ln -fsn asm_offset.h include/asm-$(XENARCH)/offset.h
 
+include/asm-$(XENARCH)/asm_offsets.h: include/asm-$(XENARCH)/offset.h
+       ln -fsn offset.h include/asm-$(XENARCH)/asm_offsets.h
+       ln -fsn offset.h include/asm-$(XENARCH)/asm_offset.h
diff --git a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/asm-offsets.c b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/asm-offsets.c
deleted file mode 100644 (file)
index 83c8171..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Generate definitions needed by assembly language modules.
- * This code generates raw asm output which is post-processed to extract
- * and format the required data.
- */
-
-#include <linux/sched.h> 
-#include <linux/stddef.h>
-#include <linux/errno.h> 
-#include <linux/hardirq.h>
-#include <linux/suspend.h>
-#include <asm/pda.h>
-#include <asm/processor.h>
-#include <asm/segment.h>
-#include <asm/thread_info.h>
-#include <asm/ia32.h>
-
-#define DEFINE(sym, val) \
-        asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-
-#define BLANK() asm volatile("\n->" : : )
-
-int main(void)
-{
-#define ENTRY(entry) DEFINE(tsk_ ## entry, offsetof(struct task_struct, entry))
-       ENTRY(state);
-       ENTRY(flags); 
-       ENTRY(thread); 
-       ENTRY(pid);
-       BLANK();
-#undef ENTRY
-#define ENTRY(entry) DEFINE(threadinfo_ ## entry, offsetof(struct thread_info, entry))
-       ENTRY(flags);
-       ENTRY(addr_limit);
-       ENTRY(preempt_count);
-       BLANK();
-#undef ENTRY
-#define ENTRY(entry) DEFINE(pda_ ## entry, offsetof(struct x8664_pda, entry))
-       ENTRY(kernelstack); 
-       ENTRY(oldrsp); 
-       ENTRY(pcurrent); 
-       ENTRY(irqrsp);
-       ENTRY(irqcount);
-       ENTRY(cpunumber);
-       ENTRY(irqstackptr);
-       ENTRY(kernel_mode);
-       BLANK();
-#undef ENTRY
-#ifdef CONFIG_IA32_EMULATION
-#define ENTRY(entry) DEFINE(IA32_SIGCONTEXT_ ## entry, offsetof(struct sigcontext_ia32, entry))
-       ENTRY(eax);
-       ENTRY(ebx);
-       ENTRY(ecx);
-       ENTRY(edx);
-       ENTRY(esi);
-       ENTRY(edi);
-       ENTRY(ebp);
-       ENTRY(esp);
-       ENTRY(eip);
-       BLANK();
-#undef ENTRY
-       DEFINE(IA32_RT_SIGFRAME_sigcontext,
-              offsetof (struct rt_sigframe32, uc.uc_mcontext));
-       BLANK();
-#endif
-       DEFINE(pbe_address, offsetof(struct pbe, address));
-       DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
-       DEFINE(pbe_next, offsetof(struct pbe, next));
-       return 0;
-}
index ac950a2a3ca0ad94aa4792b127c8c0b7d30b7605..2898cef5d72d2eeb09cc7eb9bb064a7c03cd536d 100644 (file)
          * #define VGCF_IN_SYSCALL (1<<8) 
          */
         .macro SWITCH_TO_USER flag
-        movl $0,%gs:pda_kernel_mode     # change to user mode
         subq $8*4,%rsp                   # reuse rip, cs, rflags, rsp, ss in the stack
         movq %rax,(%rsp)
         movq %r11,1*8(%rsp)
         .endm
 
         .macro SWITCH_TO_KERNEL ssoff,adjust=0
-       btsq $0,%gs:pda_kernel_mode
        jc  1f
        orb  $1,\ssoff-\adjust+4(%rsp)
 1:
index f19ff9b94b90f48749ff27b415569cbbb33865df..d1a7acefaa7df0a367d9fedafab241ef34b2ad61 100644 (file)
@@ -148,7 +148,6 @@ void cpu_idle (void)
                        if (cpu_is_offline(cpu))
                                play_dead();
 
-                        __IRQ_STAT(cpu,idle_timestamp) = jiffies;
                        xen_idle();
                }
 
diff --git a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pda.h b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pda.h
deleted file mode 100644 (file)
index 76dac1c..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#ifndef X86_64_PDA_H
-#define X86_64_PDA_H
-
-#ifndef __ASSEMBLY__
-#include <linux/stddef.h>
-#include <linux/types.h>
-#include <linux/cache.h>
-
-/* Per processor datastructure. %gs points to it while the kernel runs */ 
-struct x8664_pda {
-       struct task_struct *pcurrent;   /* Current process */
-       unsigned long data_offset;      /* Per cpu data offset from linker address */
-       struct x8664_pda *me;       /* Pointer to itself */  
-       unsigned long kernelstack;  /* top of kernel stack for current */ 
-       unsigned long oldrsp;       /* user rsp for system call */
-       unsigned long irqrsp;       /* Old rsp for interrupts. */ 
-        int irqcount;              /* Irq nesting counter. Starts with -1 */   
-       int cpunumber;              /* Logical CPU number */
-       char *irqstackptr;      /* top of irqstack */
-       unsigned int __softirq_pending;
-       unsigned int __nmi_count;       /* number of NMI on this CPUs */
-        unsigned long idle_timestamp;
-       struct mm_struct *active_mm;
-       int mmu_state;     
-       unsigned apic_timer_irqs;
-        int kernel_mode;          /* kernel or user mode */
-} ____cacheline_aligned;
-
-
-#define IRQSTACK_ORDER 2
-#define IRQSTACKSIZE (PAGE_SIZE << IRQSTACK_ORDER) 
-
-extern struct x8664_pda cpu_pda[];
-
-/* 
- * There is no fast way to get the base address of the PDA, all the accesses
- * have to mention %fs/%gs.  So it needs to be done this Torvaldian way.
- */ 
-#define sizeof_field(type,field)  (sizeof(((type *)0)->field))
-#define typeof_field(type,field)  typeof(((type *)0)->field)
-
-extern void __bad_pda_field(void);
-
-#define pda_offset(field) offsetof(struct x8664_pda, field)
-
-#define pda_to_op(op,field,val) do { \
-       switch (sizeof_field(struct x8664_pda, field)) {                \
-case 2: \
-asm volatile(op "w %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \
-case 4: \
-asm volatile(op "l %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \
-case 8: \
-asm volatile(op "q %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \
-       default: __bad_pda_field();                                     \
-       } \
-       } while (0)
-
-/* 
- * AK: PDA read accesses should be neither volatile nor have an memory clobber.
- * Unfortunately removing them causes all hell to break lose currently.
- */
-#define pda_from_op(op,field) ({ \
-       typedef typeof_field(struct x8664_pda, field) T__; T__ ret__; \
-       switch (sizeof_field(struct x8664_pda, field)) {                \
-case 2: \
-asm volatile(op "w %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\
-case 4: \
-asm volatile(op "l %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\
-case 8: \
-asm volatile(op "q %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\
-       default: __bad_pda_field();                                     \
-       } \
-       ret__; })
-
-
-#define read_pda(field) pda_from_op("mov",field)
-#define write_pda(field,val) pda_to_op("mov",field,val)
-#define add_pda(field,val) pda_to_op("add",field,val)
-#define sub_pda(field,val) pda_to_op("sub",field,val)
-
-#endif
-
-#define PDA_STACKOFFSET (5*8)
-
-#endif